﻿using System;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using LynxWikiScripting;

namespace LynxWikiScripting.Tests
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestIronWikiSyntax()
        {
            WikiScriptEngine.Initialize();
            StringBuilder scriptSource = new StringBuilder();
            scriptSource.AppendLine();
            scriptSource.AppendLine("WikiSyntax = IronWikiSyntax()");
            scriptSource.AppendLine("so = ''");
            scriptSource.AppendLine("for iwc in WikiSyntax.IronWikiClasses :");
            scriptSource.AppendLine("    so = so + '||' + iwc.Name + '||' + iwc.Description + '''||\\r\\n'''");
            scriptSource.AppendLine("ScriptOutput = so");
            //scriptSource.AppendLine("");
            //scriptSource.AppendLine("");

            string result = WikiScriptEngine.ExecuteBehavior(scriptSource.ToString());
            
            Assert.IsNotNull(result);
        }
    }
}
